<template>
<div>
  <el-cascader 
    placeholder="123s"
    @change="handleChange">
  </el-cascader>
  <SelectAddress1 :value="value" :mode="mode" @change="change"/>
  </div>
</template>

<script>
import { listRegion } from '@/api/region';
import SelectAddress1 from '../SelectAddress'
export default {
  data() {
    return {
      regionarr: [],
      seachMap: {
        pid: 0
      },
      mode: [1,1,1],
      value: '110000/110100/110101'
    }
  },
  created() {
    this.initProviceData()
  },
  computed: {},
  watch: {
    value: {
      handler(str) {
        console.log(str)
      }
    }
  },
  methods: {
    change(str) {
      console.log(str)
    },
    handleChange(){
      this.$emit('change',this.value)
      console.log(this.value)
    },
    // 初始化行政区域
    initProviceData() {
      listRegion(this.seachMap).then(res=>{
        this.provice = res.data
      })
    }
  },
  components: {
    SelectAddress1
  },
}
</script>

<style lang="less" scoped></style>
